home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13535 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Settle a bet please
  5. Date: 9 Apr 1996 05:35:54 +1200
  6. Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
  7. Message-ID: <4kbipq$k23@airdmhor.gen.nz>
  8. References: <4jfopb$o9n@news1.sympatico.ca> <Dp11Bx.2o7@watserv3.uwaterloo.ca> <4k41v6$60v@niamh.indigo.ie> <4k4d7u$rhk@solutions.solon.com>
  9. NNTP-Posting-Host: airdmhor.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. In article <4k41v6$60v@niamh.indigo.ie>, Niall Smart <nsmart@indigo.ie> wrote:
  13. >   int i; char Name[7] = "My Name";
  14. >   char More[]  = "AAAAAAA";
  15.  
  16. Peter Seebach:
  17. > There is no "char *More[]" here, and the contents of both Name and More are
  18. > writable, because they are arrays of non-const.  What is most likely
  19. > causing them not to be adjacent on some machines is a spare byte of
  20. > padding to keep everything word-aligned.  This is not a language feature,
  21. > just a likely explanation.
  22.  
  23.   Another possibility is that they're ordered backwards in memory.  I don't
  24. know why, but I've seen it happen - actually I do know why, it's because I
  25. looked.  I don't know why the compiler did it.
  26.